if WinActive("ahk_class" RiotWindowClass)
{
    MsgBox, game Exist
}
Else
{
    MsgBox, no game
}